///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#ifndef __RenderTargetListener_H__
#define __RenderTargetListener_H__


#include "OgrePrerequisites.h"

namespace Ogre {

	
	
	
    struct RenderTargetEvent
    {
        /// The source of the event being raised
        RenderTarget* source;
    };

    
    struct RenderTargetViewportEvent
    {
        /// The source of the event being raised
        Viewport* source;
    };

    
    class _OgreExport RenderTargetListener
    {
        /*
        Note that this could have been an abstract class, but I made
        the explicit choice not to do this, because I wanted to give
        people the option of only implementing the methods they wanted,
        rather than having to create 'do nothing' implementations for
        those they weren't interested in. As such this class follows
        the 'Adapter' classes in Java rather than pure interfaces.
        */
    public:
		virtual ~RenderTargetListener() {}
        
        virtual void preRenderTargetUpdate(const RenderTargetEvent& evt)
        { (void)evt; }

        
        virtual void postRenderTargetUpdate(const RenderTargetEvent& evt)
        { (void)evt; }

        /* Called just before a Viewport on a RenderTarget is to be updated.
        @remarks
            This method is called before each viewport on the RenderTarget is
            rendered to. You can use this to perform per-viewport settings changes,
            such as showing / hiding particular overlays.
        */
        virtual void preViewportUpdate(const RenderTargetViewportEvent& evt)
        { (void)evt; }

        /* Called just after a Viewport on a RenderTarget is to be updated.
        @remarks
            This method is called after each viewport on the RenderTarget is
            rendered to. 
        */
        virtual void postViewportUpdate(const RenderTargetViewportEvent& evt)
        { (void)evt; }

		
		virtual void viewportAdded(const RenderTargetViewportEvent& evt)
                { (void)evt; }
		
		virtual void viewportRemoved(const RenderTargetViewportEvent& evt)
                { (void)evt; }
    };
	
	
}

#endif
